Repository navigation
Security, correctness and performance hardening (2026 Q4) - #49
Merged
Merged
Conversation
CI resolved Go from go.mod's `go 1.27.0`, so release binaries missed every stdlib security fix through 1.27.4. golangci-lint v2.13.2 cannot decode 1.27.4 export data and fails open; v2.15.0 lints (G304 canary).
gopsutil v4.26.10, x/sys v0.50.0, x/ansi v0.12.0; indirect go-runewidth, x/text, purego and xo/terminfo v1.3.1 (decoder crash fixes upstream).
checkout v7.0.1, setup-go v7.1.0, attest-build-provenance v4.2.2, cosign-installer v4.1.4 (cosign v3), upload-artifact v7.0.2, download-artifact v8.0.2, cyclonedx-gomod v1.12.0. Verify-Release.ps1 now suggests a pinned cosign v3. winget-releaser's "# v2" comment named a moving tag; it now records the untagged commit it actually pins.
Keys reach the table before the app's handler, and bubbles' default map binds d (half page) and g (top). The table now has its own keymap with no app keys in it: arrows/jk, PgUp/PgDn, Ctrl+U/D, Home/End.
The table cursor is a row index and rows re-sort every second, so [x] and [?] could act on a process that slid under the highlight. Rows now follow the selected PID, and one comparator with a PID tie-break replaces the unstable sorts (descending tree sort also returned !less on ties).
The confirm overlay never expired and KillProcess opened by bare PID, so a PID reused while it was open could terminate an unrelated process. Snapshots now carry CreateTime; KillProcess checks it via GetProcessTimes, the overlay closes when its process exits, and killing wtop's own PID (which strands the terminal in raw mode) is refused.
killResultMsg was ignored, so a denied kill looked like nothing happened, and search errors went into lastErr, which the next tick cleared. Action outcomes now get their own status-bar message that lasts five ticks.
The overlay took its name from the rendered cell, so tree view showed connectors and the self marker. It now reads the snapshot, and warns when the target is part of wtop's own shell/terminal ancestry.
callVirtualMethod received &adapter/&desc as uintptr through a variadic helper without //go:uintptrescapes, so a stack move during SyscallN could let GetDesc1 write into stale stack memory. Added the directive.
MEMORYSTATUSEX's TotalPageFile is the commit limit (RAM + pagefiles), so Swap duplicated Cmt and showed gigabytes on machines with no pagefile. Swap now comes from SystemPageFileInformation, one NtQuerySystemInformation call per tick.
Disk and GPU queries prime and are then read microseconds later on the first Collect, so the first rate was a spike or zero, and GPU cached it for 5 s. The first disk read now reports zero rates; the detached GPU refresh waits out a full second after priming.
PPID is only the parent's PID at creation; after the parent exits and the number is reused, the edge points at a younger, unrelated process. Edges to a parent created after the child are now dropped, fixing misparented tree rows and false self-chain marks.
Summed per-engine utilisation could exceed 100%; a negative LUID HighPart formatted as signed never matched its PDH instance; and NVML names over 64 bytes came back empty (the V2 buffer size is 96).
Each SYSTEM_PROCESS_INFORMATION was read through an unchecked struct overlay, so a malformed NextEntryOffset could read past the data the kernel returned. The walk now stops at ReturnLength.
exec searched PATH with PATHEXT, so an nvidia-smi.bat earlier on PATH would run via cmd.exe every 5 s, and PATH was scanned twice per refresh. The exe is now resolved once from System32 or NVSMI, and WaitDelay stops an inherited pipe holding Output past its timeout.
wtop runs below normal, and Windows hands that class to its children, so a browser launched by [?] stayed below normal for its whole session. wtop now lifts itself to normal for the duration of the launch only.
Local State's profile.last_used was joined onto User Data unchecked, so "..\..\x" escaped the profile root; it must now be a single plain name. Preferences and Local State reads are capped at 16 MiB.
A handler registered as "%ProgramFiles%\...\browser.exe" was read unexpanded, failed the existence check, and [?] silently fell back to DuckDuckGo instead of the user's browser engine.
Holding [?] auto-repeats the key and each repeat launched another browser tab. Further presses are ignored until the in-flight search reports back.
QueryEscape encodes a space as "+", which an engine reads as a literal
plus when its template puts {searchTerms} in the URL path. Path-position
terms are now PathEscaped.
Nothing has scanned dependencies since Snyk was removed in #44. CI now runs govulncheck (reachable vulns, Windows code paths) and, on PRs, the dependency-review action.
build/sbom only upload artifacts, so contents: write drops to read; checkouts no longer persist the token; release builds skip the shared Go cache and run go mod verify; the tag reaches shell steps via $TAG and anything but vX.Y.Z is rejected up front.
Snyk flagged tag_name from the GitHub API flowing into innerHTML. The tag is now validated as vX.Y.Z and written via text nodes only; the script moved to site.js so the CSP is script-src 'self' instead of 'unsafe-inline' (privacy.html, which has no script, gets 'none').
The documented cosign command used an unanchored identity regexp that accepted any workflow on any ref in the repo, and gh attestation verify checked only --repo. Both now require release.yml@refs/tags/<tag>; the script also denies self-hosted runners.
The SBOM only had provenance of its own, which doesn't bind it to what it describes, and the release zip had no signature or attestation at all. Release now attests the SBOM against the .exe files and attests a SHA256SUMS covering every asset. Docs no longer claim reproducible builds.
auto_assign and winget-track granted write scopes workflow-wide. Both now
default to permissions: {} and grant per job; auto_assign notes why its
pull_request_target trigger is safe.
Any GitHub user can comment on the winget-pkgs PR, and matching comments were re-posted verbatim into this repo's issues. Only Bot accounts and wingetbot are mirrored now, with @-mentions defused.
No job set timeout-minutes, so a hung step (a wedged download, a stuck poll) held a runner for GitHub's six-hour default.
View() rendered CPU, metrics, the table and the status bar on every frame, then discarded all of it while the confirmation was showing.
Names are kept per (PID, create time) instead of re-decoded from UTF-16 every tick, the sample maps are double-buffered, scratch slices and maps are reused, and the CPU sort the UI immediately redoes is gone. BenchmarkLive_CollectProcs: 238 KB/550 allocs -> 49 KB/11 allocs.
The RAM bar's "standby" segment came from \Memory\Cache Bytes, which is in-use memory, so standby was understated and in-use derived from it was wrong. It is now the sum of the three Standby Cache counters.
GPUSourcePowerShell and the panel's "(limited: Get-Counter)" note described a PowerShell path that no longer exists; the source is DXGI plus PDH. Also corrects a stale gpuCache reference in a benchmark.
Owner
Author
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Security, performance and best-practice review, with one commit per finding. Each commit builds and passes tests on its own.
Process actions
[d]and[g]no longer move the cursor: the table now has its own keymap.Collector
//go:uintptrescapeson the DXGI COM helper.Hardening
nvidia-smiruns from a fixed driver path instead of a PATH search.[?]is debounced.Supply chain
0 issueswithout linting.go mod verify;$TAGonly;SHA256SUMScovers every asset.release.yml@refs/tags/<tag>.script-src 'self'.Performance